package com.dunqi.gpm.cangxi.home.activity;

import android.os.Bundle;

import com.dunqi.gpm.cangxi.R;
import com.dunqi.gpm.cangxi.common.base.BaseAct;
import com.dunqi.gpm.cangxi.home.fragment.HomeFragment;
import com.dunqi.gpm.cangxi.home.fragment.ProjectListFragment;
import com.dunqi.gpm.cangxi.mine.util.UserUtil;

import java.util.HashMap;
//没用这个

public class WarehouseAuditActivity extends BaseAct {

//    @BindView(R.id.tab_layout)
//    TabLayout tabLayout;
//    @BindView(R.id.view_pager)
//    ViewPager viewPager;
//    String[] titles = {"待审核", "已审核"};
    //1 待审核
//2     审核通过
//    ArrayList<Fragment> fragments = new ArrayList<>();

    @Override
    protected void refreshData(Bundle savedInstanceState) {

    }

    @Override
    protected void initUiAndListener() {
        HashMap<String, String> map = new HashMap<>();
        if (UserUtil.userFromRespOrg()) {
            map.put("uda", "true");
        } else {
            map.put("uda", "false");
            if (HomeFragment.homeMenuId ==12)
                map.put("audit_status", "1");
            else
                map.put("audit_status", "1,2,3");
        }

        ProjectListFragment fragment = ProjectListFragment.newInstance(map, ProjectDetailActivity.TYPE_AUDIT);
        getSupportFragmentManager().beginTransaction()
                .add(R.id.container, fragment)
                .commit();

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_warehouse_audit;
    }
}
